package com.platform.modules.wallet.service;

import com.platform.common.web.service.BaseService;
import com.platform.modules.wallet.domain.WalletRedPacketSub;
import com.platform.modules.wallet.domain.WalletTransfer;
import com.platform.modules.wallet.enums.RedPacketStatusEnum;
import com.platform.modules.wallet.vo.RedPacketSubVo;
import com.platform.modules.wallet.vo.RedPacketSubVo01;

import java.util.List;

public interface WalletRedPacketSubService extends BaseService<WalletRedPacketSub> {

    WalletRedPacketSub createRedPacketSub(RedPacketSubVo vo);

    //    List<WalletRedPacketSub> queryByRedRacketId(Long id);

    List<WalletRedPacketSub> queryByRedRacketId(Long redPacketId);

    /**
     * 根据红包ID查询接收人记录
     * @param redPacketId
     * @param toId
     * @return
     */
    List<WalletRedPacketSub> queryByToId(Long redPacketId, Long toId);

    /**
     * 根据红包ID和状态查询红包记录
     * @param redPacketId
     * @param statusEnum
     * @return
     */
    List<WalletRedPacketSub> queryByStatus(Long redPacketId, RedPacketStatusEnum statusEnum);
    /**
     * 查询状态为领取成功的红包记录
     * @param redPacketId
     * @return
     */
    List<WalletRedPacketSub> queryByStatusSuccess(Long redPacketId);
    /**
     * 查询状态为未领取的红包记录
     * @param redPacketId
     * @return
     */
    List<WalletRedPacketSub> queryByStatusInit(Long redPacketId);
    /**
     * 打开红包
     * @param redPacketId
     * @return
     */
    RedPacketSubVo01 openRedPacket(Long redPacketId, Long userId);

    /**
     * 获取退款订单
     * @return
     */
    List<WalletRedPacketSub> getRefun();

    void refund(Long id);

    Integer clearRecord(String beforeToday);

    Integer querySumAll();
}
